package com.wcfsy.wechat.wx.entity;

import java.util.Date;

public class PrizeInfo extends BaseEntity {
	private String prizeName;// 产品名称
	private Integer buyTotal;// 产品总数
	private Integer buyMaterial = 0;// 兑换所需原料
	private Integer buyedTotal;// 已兑换总数
	private Integer remaTotal;// 剩余总数
	private Integer showIndex;// 排序字段
	private String imageUrl;// 图片地址
	private String bigImageUrl;// 大图片地址
	private Date createDate;// 创建时间
	private Date updateDate;// 修改时间
	private String prizeDesc;// varchar(255) NULL产品描述
	private Integer status;// 产品状态(1=待审核(数据初始化)|2=审核通过(上架)|3=已售完,4=删除
	private Integer isVirtual;// int(255) NULL是否为虚拟物品2,是，1不是
	private Integer maxBuyNum;
	/**
	 * 1不可制作，2可以制作
	 */
	private int canEhange = 0;
	/**
	 * 一等奖兑换条件
	 */
	private String changeCondition;

	public String getPrizeName() {
		return prizeName;
	}

	public void setPrizeName(String prizeName) {
		this.prizeName = prizeName;
	}

	public Integer getBuyTotal() {
		return buyTotal;
	}

	public void setBuyTotal(Integer buyTotal) {
		this.buyTotal = buyTotal;
	}

	public Integer getBuyMaterial() {
		return buyMaterial;
	}

	public void setBuyMaterial(Integer buyMaterial) {
		this.buyMaterial = buyMaterial;
	}

	public Integer getBuyedTotal() {
		return buyedTotal;
	}

	public void setBuyedTotal(Integer buyedTotal) {
		this.buyedTotal = buyedTotal;
	}

	public Integer getRemaTotal() {
		if (buyedTotal != null) {
			this.remaTotal = this.buyTotal.intValue()
					- this.buyedTotal.intValue();
		} else {
			this.remaTotal = this.buyTotal.intValue();
		}
		return this.remaTotal;
	}

	public void setRemaTotal(Integer remaTotal) {
		this.remaTotal = remaTotal;
	}

	public Integer getShowIndex() {
		return showIndex;
	}

	public void setShowIndex(Integer showIndex) {
		this.showIndex = showIndex;
	}

	public String getImageUrl() {
		return imageUrl;
	}

	public void setImageUrl(String imageUrl) {
		this.imageUrl = imageUrl;
	}

	public String getBigImageUrl() {
		return bigImageUrl;
	}

	public void setBigImageUrl(String bigImageUrl) {
		this.bigImageUrl = bigImageUrl;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public String getPrizeDesc() {
		return prizeDesc;
	}

	public void setPrizeDesc(String prizeDesc) {
		this.prizeDesc = prizeDesc;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getIsVirtual() {
		return isVirtual;
	}

	public void setIsVirtual(Integer isVirtual) {
		this.isVirtual = isVirtual;
	}

	public Integer getMaxBuyNum() {
		return maxBuyNum;
	}

	public void setMaxBuyNum(Integer maxBuyNum) {
		this.maxBuyNum = maxBuyNum;
	}

	public int getCanEhange() {
		return canEhange;
	}

	public void setCanEhange(int canEhange) {
		this.canEhange = canEhange;
	}

	public String getChangeCondition() {
		return changeCondition;
	}

	public void setChangeCondition(String changeCondition) {
		this.changeCondition = changeCondition;
	}

}
